(function(){
	angular.module('app',['ui.router','angularCSS','myService','homeMod','cateMod','cartMod','mineMod','seckillMod'])
	.config(['$stateProvider','$urlRouterProvider',function($stateProvider,$urlRouterProvider){
		$stateProvider
		.state('home',{
			url:"/home",
			views: {
				'view': {
					templateUrl:'template/home/home.html',
					controller: 'homeCtrl',
					css:'template/home/home.css'
				}
			}
			
		})
		.state('cate',{
			url:"/cate",
			views: {
				'view': {
					templateUrl: 'template/cate/cate.html',
					controller: 'cateCtrl',
					css: 'template/cate/cate.css'
				}
			}
			
		})
		.state('cate.hotsale',{
			url: "/hotsale",
			views: {
				'hot-sale': {
					templateUrl: 'template/cate/catelist/hotsale.html',
					css: 'template/cate/cate.css',
					controller:'hotsaleCtrl'
				}
			}
		})
		.state('cate.makeprice',{
			url: "/makeprice",
			views: {
				'today-sale': {
					templateUrl: 'template/cate/catelist/makeprice.html',
					css: 'template/cate/cate.css',
					controller:'makepriceCtrl'
				}
			}
		})
		.state('cate.fruit',{
			url: "/fruit",
			views: {
				'fruit-sale': {
					templateUrl: 'template/cate/catelist/fruit.html',
					css: 'template/cate/cate.css',
					controller: 'fruitCtrl'
				}
			}
		})
		.state('cate.milk',{
			url: "/milk",
			views: {
				'milk-sale': {
					templateUrl: 'template/cate/catelist/milk.html',
					css: 'template/cate/cate.css',
					controller: 'milkCtrl'
				}
			}
		})
		.state('cart',{
			url:"/cart",
			views: {
				'view': {
					templateUrl: 'template/cart/cart.html',
					controller: 'cartCtrl',
					css: 'template/cart/cart.css'
				}
			}
			
		})
		.state('mine',{
			url:"/mine",
			views: {
				'view': {
					templateUrl: 'template/mine/mine.html',
					controller: 'mineCtrl',
					css: 'template/mine/mine.css'
				}
			}
			
		})
		.state('1',{
			url: '/seckill',
			views: {
				'seckill': {
					templateUrl:'template/seckill/seckill.html',
					controller: 'seckillCtrl',
					css: 'template/seckill/seckill.css'
				}
			}
		})

		$urlRouterProvider
		.otherwise('/home')
	}])

	.controller("ctrlaaa",['$scope','total',function($scope,total){
		$scope.count = total;	
	}])
})()